#include <iostream>

#include "set.h"

using namespace std;
using namespace msl;

int main() {
    Set<int> s;
    vector<int> gen_vals;
    int n;
    cout << "Enter elements' count: "; cin >> n;
    gen_vals = vector<int>(n);
    cout << "Enter elements: ";
    for (int i = 0; i < n; i++) {
        cin >> gen_vals[i];
    }

    cout << "Balanced tree for searching:\n";
    s.create_balance_tree(gen_vals);
    cout << print_set(s);

    cout << "Maximum element: " << *(--s.end()) << "\n";
}
